Image processing apparatus, non-transitory computer readable medium storing program and image processing method

ABSTRACT

An image processing apparatus includes an extracting unit that extracts each tablespace image from each page of image data containing plural pages read by a document reading device, a generating unit that generates each table structure data of the tables from each tablespace image extracted by the extracting unit, a discrimination unit that discriminates a connection possibility between the tables based on table structure data of the tables of each page generated by the generating unit, a determination unit that determines a connection sequence for restoring an original table by connecting each of the tables based on the connection possibility between the tables discriminated by the discrimination unit, and a restoring unit that restores data on a single table before division by connecting each of the tables based on the connection sequence determined by the determination unit.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based on and claims priority under 35 USC 119 fromJapanese Patent Application No. 2011-153710, filed Jul. 12, 2011.

BACKGROUND Technical Field

The invention relates to an image processing apparatus, a non-transitorycomputer readable medium storing an image processing program and animage processing method.

SUMMARY Image Processing Apparatus

According to an aspect of the invention, there is provided an imageprocessing apparatus including: an extracting unit that extracts eachtablespace image from each page of image data containing plural pagesread by a document reading device; a generating unit that generates eachtable structure data of tables from each tablespace image extracted bythe extracting unit; a discrimination unit that discriminates aconnection possibility between the tables based on the table structuredata of the tables of each page generated by the generating unit; adetermination unit that determines a connection sequence for restoring aoriginal table by connecting each of the tables based on the connectionpossibility between the tables discriminated by the discrimination unit;and a restoring unit that restores data on a single table beforedivision by connecting each of the tables based on the connectionsequence determined by the determination unit.

BRIEF DESCRIPTION OF THE DRAWINGS

Exemplary embodiments of the present invention will be described indetail based on the following figures, wherein:

FIG. 1 is a diagram illustrating a configuration of an image formingapparatus according to an exemplary embodiment of the present invention;

FIG. 2 is a block diagram illustrating a hardware configuration of animage forming apparatus according to an exemplary embodiment of thepresent invention;

FIG. 3 is a block diagram illustrating a functional configuration of animage processing apparatus in an image forming apparatus according to anexemplary embodiment of the present invention;

FIGS. 4A to 4C are diagrams illustrating a print state in a case where atable larger than a print paper is printed;

FIGS. 5A to 5D are diagrams illustrating a specific operation when aconnection possibility of two tables is discriminated by a tableconnectivity discrimination unit;

FIGS. 6A to 6F are diagrams illustrating a possible table connectionstate in a case where a print sequence is from the left to the right,and a total number of tables is 12;

FIGS. 7A to 7F are diagrams illustrating a possible table connectionstate in a case where a print sequence is from the top to the bottom,and a total number of tables is 12;

FIGS. 8A and 8B are diagrams illustrating a case where a combination oftables for determining the connection possibility is discriminated basedon the table dividing number X/Y;

FIGS. 9A to 9C are diagrams illustrating an operation when a table datarestoring unit determines the connection sequence for restoring theoriginal table by connecting each table based on the connectionpossibility between each of the tables;

FIG. 10 is a diagram illustrating an exemplary case where informationrepresenting the connection position of each table in the entire tableafter the connection using a display unit;

FIG. 11 is a flowchart illustrating an operation when the documenthaving multiple pages is read by the image processing apparatusaccording to an exemplary embodiment of the present invention; and

FIG. 12 is a flowchart illustrating an operation when a table ofmultiple pages read by the image processing apparatus is restored as asingle table according to an exemplary embodiment of the presentinvention.

DETAILED DESCRIPTION

Hereinafter, an exemplary embodiment of the present invention will bedescribed in detail with reference to the accompanying drawings.

FIG. 1 is a block diagram illustrating a configuration of the imageforming apparatus 10 according to the exemplary embodiment of thepresent invention.

As shown in FIG. 1, an image forming apparatus according to theexemplary embodiment of the present invention includes a networkinterface unit 14, a user interface unit 15, a scanner 16, an imageoutput unit 17, an image processing apparatus 30, and a controller 31.

The scanner 16 acquires image data by reading the document set in atray, and the like. The scanner 16 acquires digital image data byscanning the document and performing analog-to-digital (A/D) conversionfor the signal output obtained by an element such as a charge coupleddevice (CCD). The image data read by the scanner 16 includes the colorcomponents of each of red, green, and blue (RGB).

The image processing apparatus 30 performs various kinds of imageprocessing for the image data read by the scanner 16. The image outputunit 17 prints out the image based on image data after the imageprocessing apparatus 30 performs the image processing under control ofthe controller 31.

The network interface unit 15 transmits the image data through thenetwork or receives the image data transmitted through the network. Theuser interface unit 15 receives an instruction from a user and transmitsthe content of the instruction to the controller 31.

The controller 31 executes control for performing the print operation inthe image output unit 17 based on the image data received through thenetwork interface unit 14 or the image data from the image processingapparatus 30. In addition, the controller 31 also performs control suchthat image data obtained by the scanner 16 is transmitted to an intendeddestination via the network through the network interface unit 14 afterthe image processing apparatus 30 performs the image processing.

In addition, the image forming apparatus 10 is an apparatus called amultifunction machine having a number of functions such as a printfunction, a scan function, a copy function, and a facsimile function.

Next, FIG. 2 illustrates a hardware configuration of the image formingapparatus 10 according to the exemplary embodiment of the invention.

As shown in FIG. 2, the image forming apparatus 10 includes a CPU 11, amemory 12, a storage apparatus 13 such as hard disk drive (HDD), anetwork interface unit 14 for transmitting or receiving the data betweenthe external apparatus, and the like through the network, a userinterface unit 15 including a touch panel or a liquid crystal displayand a keyboard, a scanner 16, and an image output unit 17. Such elementsare connected to each other through a control bus 18.

The CPU 11 performs a predetermined process based on a control programstored in the memory 12 or the storage apparatus 13 and controls theoperation of the image forming apparatus 10. In addition, althoughdescription has been made in the present embodiment for a case where theCPU 11 reads and executes the control program stored in the memory 12 orthe storage apparatus 13, the corresponding program may be stored in astorage medium such as a CD-ROM and provided to the CPU 11.

FIG. 3 is a block diagram illustrating a functional configuration of theimage processing apparatus 30 in the image forming apparatus 10 realizedby executing the control program described above.

As shown in FIG. 3, the image processing apparatus 30 according to anexemplary embodiment of the invention includes an image dataaccumulation unit 41, a tablespace extracting unit 42, a table structuredata generating unit 43, a table data restoring unit 44, a tableconnectivity discrimination unit 45, an input unit 46, a display unit47, and a format conversion unit 48.

The image data accumulation unit 41 accumulates image data read by thescanner 16 which is the document reading device.

The tablespace extracting unit 42 extracts a tablespace image from eachpage of image data containing the multiple pages read by the scanner 16and accumulated in the image data accumulation unit 41.

For example, if the table data shown in FIG. 4A is to be printed, andthis table data is not fitted to a single print paper, this table datais divided and printed to the multiple pages as shown in FIG. 4B. In thepresent embodiment, the document containing the multiple pages dividedand printed in this manner is read as image data by scanning thedocument according to a print sequence as shown in FIG. 4C. Thetablespace extracting unit 42 extracts each tablespace from the imagedata of such multiple pages.

The tablespace extracting unit 42 uses an object separation process as atablespace extracting process. That is, the tablespace extracting unit42 performs the object separation process for the image data read by thescanner 16 and separates the image data for each object including atable image, a CG image, a picture image, a character image, and a linedrawing.

The table structure data generating unit 43 generates each tablestructure data of the tables from each tablespace image extracted by thetablespace extracting unit 42. Specifically, the table structure datagenerating unit 43 performs the layout analysis for the table objectseparated by the tablespace extracting unit 42 and obtains the tablestructure data by performing a character recognition process (an opticalcharacter recognition (OCR) process) for the character object.

The table connectivity discrimination unit 45 discriminates theconnection possibility between each of the tables based on the tablestructure data of the tables of each page generated by the tablestructure data generating unit 43. Specifically, the table connectivitydiscrimination unit 45 discriminates the connection possibility betweeneach of the tables based on a combination of at least one or more piecesof information including heights or widths of each table, the number ofrows and columns of the cells contained in each table, heights or widthsof each cell, attributes of each cell, a thickness of the ruled lineincluding each table, or a line type.

FIG. 5A illustrates a case where the heights of two tables are comparedto discriminate the connection possibility. In addition, FIG. 5Billustrates a case where the numbers of cells in the Y direction of twotables are compared to discriminate the connection possibility. FIG. 5Cillustrates a case where the heights of each cell of two tables arecompared to discriminate the connection possibility. FIG. 5D illustratesa case where the background colors, the top ruled line thicknesses, thebottom ruled line thicknesses of cells of two tables are compared todiscriminate the connection possibility.

For example, the table connectivity discrimination unit 45 may setvalues for each comparison item as shown in FIGS. 5A to 5D in advance,add the values of matching items, and display the result in percentage(%) as the connection possibility between the compared tables.

In addition, the table connectivity discrimination unit may discriminatethe four-directional connection possibilities on the left, right, topand bottom by combining all tables. If it is guaranteed that pages arescanned in the print sequence, and a connection possibility between acertain table and the table read afterwards is discriminated, only aright-directional or downward connection possibility may bediscriminated.

In addition, the table connectivity discrimination unit 45 may notdiscriminate connection possibilities for all combinations of the tablesbut may determine a combination of tables for discriminating theconnection possibility based on the number of the tables extracted bythe tablespace extracting unit 42.

For example, assuming that the number of the extracted tables is 12, andthe tables are read as they are printed, it is certain that any one ofthe connection sequences shown in FIGS. 6A to 6F or FIGS. 7A to 7B areestablished.

The input unit 46 inputs the table division number X/Y representing howthe original table before the division is divided in the row and columndirections through the user interface unit 15 or information on theprint sequence when the original table before the division is dividinglyprinted.

The table connectivity discrimination unit 45 may determine acombination of tables for discriminating the connection possibilitybased on information on the print sequence input by input unit 46.

If the print sequence when the table data are dividingly printed and thenumber of the extracted tables are specified, the table connectivitydiscrimination unit 45 may limit a combination of the tables fordetermining the connection possibility based on the number of tables andthe print sequence.

For example, if the print sequence is from the left to the right, and atotal number of the tables is 12, it is certain that there is only theconnection state of any one of FIGS. 6A to 6F. If the print sequence isfrom the top to the bottom, and a total number of the tables is 12, itis certain that only the connection state of any one of FIGS. 7A to 7Fis established.

The table connectivity discrimination unit 45 may discriminate acombination of the tables for determining the connection possibilitybased on information on the table division number X/Y input by the inputunit 46. The table division number X/Y includes the information on theX-directional division number DIVx and information on the Y-directionaldivision number DIVy, indicating how many parts the original table isdivided into in the X direction and the Y direction, respectively.

For example, description will be made for a case where the X-directionaldivision number DIVx is set to 4, and the Y-directional division numberDIVy is set to 3 with reference to FIG. 8. In this case, if the printdirection is from the top to the bottom, the page necessary todiscriminate the connectivity of the right direction in a certain nthpage is n+DIVy, the page necessary to discriminate the connectivity ofthe bottom direction is n+1. In addition, there is a condition that bothof n+DIVy and n+1 do not exceed the total page number P (here, set to12). For example, it is recognized that the page necessary todiscriminate the connectivity of the right direction in the table of the8th page is the table of the 11th (=8+3) page, and the page necessary todiscriminate the connectivity of the bottom direction is the table ofthe 9th (=8+1) page.

In addition, if the print direction is from the left to the lower right,as shown in FIG. 8B, the page necessary to discriminate the connectivityof the right direction in a certain nth page is n+1, and the pagenecessary to discriminate the connectivity of the bottom direction isn+DIVx. Here, there is a condition that both of n+1 and n+DIVx do notexceed the total page number P (here, set to 12). For example, the pagenecessary to discriminate the connectivity of the right direction in thetable of the 7th page is the table of the 8th (=7+1) page, and the pagenecessary to discriminate the connectivity of the bottom direction isthe table of the 11th (=7+4) page.

The table data restoring unit 44 determines the connection sequence forrestoring the original table by connecting each table based on theconnection possibility between each of the tables discriminated by thetable connectivity discrimination unit 45. The table data restoring unit44 restores data on a single table before the division by connectingeach of the tables based on the determined connection sequence.

For example, if the connection possibilities in the horizontal directionand the vertical direction between the table extracted from the documentof the first page and the table extracted from the document of thesecond page are 11 percentage and 92 percentage, respectively, as shownin FIG. 9A, the table data restoring unit 44 determines the connectionsequence such that the second page table is connected to the bottom ofthe first page table.

If the connection possibility in the vertical direction of the tableextracted from the second page of the document and the table extractedfrom the third page of the document is 92 percentage, and the connectionpossibility in the horizontal direction of the table extracted from thefirst page of the document and the table extracted from the third pageof the document is 8 percentage, the table data restoring unit 44determines the connection sequence such that the third page table isconnected to the bottom of the second page table.

If the connection possibility in the vertical direction of the tableextracted from the third page of the document and the table extractedfrom the fourth page of the document is 8 percentage, and the connectionpossibility in the horizontal direction of the table extracted from thefirst page of the document and the table extracted from the fourth pageof the document is 96 percent, the table data restoring unit 44determines the connection sequence such that the fourth page table isconnected to the right side of the first page table. In this manner, thetable data restoring unit 44 sequentially determines the connectionsequence of the tables on each page.

The display unit 47 displays information indicating connecting positionsof each table in the entire table after the connection through the userinterface unit 15. For example, the display unit 47 displays that shownin FIG. 10 to a user.

If the table data restoring unit 44 may be configured such that data ona single table before the division may be restored by connecting eachtable when permission connection between the tables is input at thedisplayed connection position.

The format conversion unit 48 converts the data on the table restored bythe table data restoring unit 44 into the data on the table of a generalformat such as Excel (registered trademark) and transmits it to a severor a terminal specified as the destination through the network interfaceunit 14.

Next, the operation when the data on a single table is reproduced byreading the data on the table from the document containing the multiplepages using the image processing apparatus 30 according to an exemplaryembodiment will be described in detail with reference to theaccompanying drawings.

FIG. 11 is a flow chart illustrating the operation when a documentcontaining the multiple pages is read by the image processing apparatus30 according to an exemplary embodiment of the present invention.

First, the document images printed by dividing a single table intomultiple pages are read by the scanner 16 and accumulated in the imagedata accumulation unit 41 (step S101). The number of pages P isincremented by one (step S102), the tablespace is extracted from thisimage data by the tablespace extracting unit 42 (step S103), and thetable structure is analyzed by the table structure data generating unit43 (step S104).

If there still remains the document to be read (YES in step S105), theprocess of the steps S101 to S104 is repeated so that the table imagesof all pages are read.

FIG. 12 is a flowchart illustrating the operation when the table of themultiple pages read by the image processing apparatus 30 is restored tothe data on a single table according to an exemplary embodiment of thepresent invention.

If the document containing the multiple pages is read, and the tablestructure data are obtained from each page, first, X is set to 1 as theinitial value (step S201). The table connection possibilitydiscrimination unit 45 extracts the table structure data of X page (stepS202). That is, here, the table structure data of the first page isextracted.

The value of Y indicating the page to be compared is set to X+1 (stepS203). That is, here, the initial value of Y is set to 2. Then, thetable connection possibility discrimination unit 45 extracts the tablestructure data of Y page, that is, the table structure data of thesecond page (step S204).

The table connection possibility discrimination unit 45 discriminatesthe connection possibility between Xth and Yth tables, that is, theextracted table of the first page and the extracted table of the secondpage (step S205). Here, the table connection possibility discriminationunit 45 may discriminates the connection possibility on the left, right,top and bottom directions between the table of the first page and thetable of the second page. If the reading is made in the print sequence,the discrimination may be made only for the connection possibility ofthe right and bottom directions of the first page.

The table connection possibility discrimination unit 45 updates theconnection information of the X page, that is, the table of the firstpage (step S206) and increments the value of Y by 1 (step S207). If thevalue of Y is not equal to the total page number P (NO in step S208),the table connection possibility discrimination unit 45 repeats theprocess of steps S204 to S207. That is, the connection possibilitiesbetween the table of the first page and the tables of the third to Ppages are sequentially discriminated.

If the value of Y is equal to the total page number P (YES in stepS208), the table connection possibility discrimination unit 45increments X by 1 (step S209). If the value of X is not equal to thetotal page number P (NO in step S210), the table connection possibilitydiscrimination unit 45 repeats the process of steps S201 to S208. Thatis, the table connection possibility discrimination unit 45 sequentiallydiscriminates the connection possibilities between the table of thesecond page and the tables of third to P pages, the connectionpossibilities between the table of third page and the tables of thefourth to P pages, . . . , the connection possibility between that tableof P−1 page and the table of P page.

If the value of X is equal to the total page number P (YES in stepS201), and the discrimination of the connection possibilities to allpages is terminated, the table data restoring unit 44 discriminates aconnection sequence for specifying how to connect each table based onthe connection possibility between the tables determined by the tableconnection possibility discrimination unit 45 (step S211). In addition,the table data restoring unit 44 restores a single original table beforethe division by connecting each the tables based on the determinedconnection sequence (step S212).

Although the connection possibility between the tables is determined forall combinations in the process of discriminating the connectionsequence as shown in the flowchart of FIG. 12, the combination of tablesfor discriminating the connection possibility may be limited based onthe total page number, the table division number X/Y, the printsequence, and the like.

The foregoing description of the exemplary embodiments of the presentinvention has been provided for the purposes of illustration anddescription. It is not intended to be exhaustive or to limit theinvention to the precise forms disclosed. Obviously, many modificationsand variations will be apparent to practitioners skilled in the art. Theembodiments were chosen and described in order to best explain theprinciples of the invention and its practical applications, therebyenabling others skilled in the art to understand the invention forvarious embodiments and with the various modifications as are suited tothe particular use contemplated. It is intended that the scope of theinvention be defined by the following claims and their equivalents.

1. An image processing apparatus comprising: an extracting unit thatextracts each tablespace image from each page of image data containing aplurality of pages read by a document reading device; a generating unitthat generates each table structure data of tables from each tablespaceimage extracted by the extracting unit; a discrimination unit thatdiscriminates a connection possibility between the tables based on thetable structure data of the tables of each page generated by thegenerating unit; a determination unit that determines a connectionsequence for restoring an original table by connecting each of thetables based on the connection possibility between the tablesdiscriminated by the discrimination unit; and a restoring unit thatrestores data on a single table before division by connecting each ofthe tables based on the connection sequence determined by thedetermination unit.
 2. The image processing apparatus according to claim1, wherein the discrimination unit discriminates a connectionpossibility between each of the tables based on a combination of atleast one or more pieces of information including heights or widths ofeach table, the number of rows or columns of the cells contained in eachtable, heights or widths of each cell, attributes of each cell, athickness of a ruled line including each table, or a line type.
 3. Theimage processing apparatus according to claim 1, wherein thedetermination unit determines a combination of tables for discriminatingthe connection possibility based on the number of tables extracted bythe extracting unit.
 4. The image processing apparatus according toclaim 2, wherein the determination unit determines a combination oftables for discriminating the connection possibility based on the numberof tables extracted by the extracting unit.
 5. The image processingapparatus according to claim 1, further comprising: an input unit thatinputs a table division number indicating how an original table beforedivision is divided along the row and column directions, wherein thedetermination unit determines a combination of the tables fordiscriminating a connection possibility based on information on thetable division number input by the input unit.
 6. The image processingapparatus according to claim 2, further comprising: an input unit thatinputs a table division number indicating how an original table beforedivision is divided along the row and column directions, wherein thedetermination unit determines a combination of the tables fordiscriminating a connection possibility based on information on thetable division number input by the input unit.
 7. The image processingapparatus according to claim 1, further comprising: an input unit thatinputs information on a print sequence when an original table beforedivision is dividingly printed, wherein the determination unitdetermines a combination of the tables for discriminating the connectionpossibility based on information on the print sequence input by theinput unit.
 8. The image processing apparatus according to claim 2,further comprising: an input unit that inputs information on a printsequence when an original table before division is dividingly printed,wherein the determination unit determines a combination of the tablesfor discriminating the connection possibility based on information onthe print sequence input by the input unit.
 9. The image processingapparatus according to claim 1, further comprising: a display thatdisplays information indicating connection positions of each table inthe entire table after connection, wherein the restoring unit restoresdata on a single table before division by connecting each of the tableswhen permission for connection between each table is input at adisplayed connection position.
 10. The image processing apparatusaccording to claim 2, further comprising: a display that displaysinformation indicating connection positions of each table in the entiretable after connection, wherein the restoring unit restores data on asingle table before division by connecting each of the tables whenpermission for connection between each table is input at a displayedconnection position.
 11. The image processing apparatus according toclaim 3, further comprising: a display that displays informationindicating connection positions of each table in the entire table afterconnection, wherein the restoring unit restores data on a single tablebefore division by connecting each of the tables when permission forconnection between each table is input at a displayed connectionposition.
 12. The image processing apparatus according to claim 4,further comprising: a display that displays information indicatingconnection positions of each table in the entire table after connection,wherein the restoring unit restores data on a single table beforedivision by connecting each of the tables when permission for connectionbetween each table is input at a displayed connection position.
 13. Theimage processing apparatus according to claim 5, further comprising: adisplay that displays information indicating connection positions ofeach table in the entire table after connection, wherein the restoringunit restores data on a single table before division by connecting eachof the tables when permission for connection between each table is inputat a displayed connection position.
 14. The image processing apparatusaccording to claim 6, further comprising: a display that displaysinformation indicating connection positions of each table in the entiretable after connection, wherein the restoring unit restores data on asingle table before division by connecting each of the tables whenpermission for connection between each table is input at a displayedconnection position.
 15. The image processing apparatus according toclaim 7, further comprising: a display that displays informationindicating connection positions of each table in the entire table afterconnection, wherein the restoring unit restores data on a single tablebefore division by connecting each of the tables when permission forconnection between each table is input at a displayed connectionposition.
 16. The image processing apparatus according to claim 8,further comprising: a display that displays information indicatingconnection positions of each table in the entire table after connection,wherein the restoring unit restores data on a single table beforedivision by connecting each of the tables when permission for connectionbetween each table is input at a displayed connection position.
 17. Anon-transitory computer readable medium storing a program causing acomputer to execute a process for image processing, the processcomprising: extracting each tablespace image from each page of imagedata containing a plurality of pages read by a document reading device;generating each table structure data of tables from each extractedtablespace image; discriminating a connection possibility between thetables based on the generated table structure data on the tables of eachpage; determining a connection sequence for restoring an original tableby connecting each of the tables based on the discriminated connectionpossibility between each of the tables; and restoring data on a singletable before division by connecting each of the tables based on thedetermined connection sequence.
 18. An image processing methodcomprising: extracting each tablespace image from each page of imagedata containing a plurality of pages read by a document reading device;generating each table structure data of tables from each extractedtablespace image; discriminating a connection possibility between thetables based on the table structure data of the tables of each generatedpage; determining a connection sequence for restoring an original tableby connecting each of the tables based on the connection possibilitybetween the discriminated tables; and restoring data on a single tablebefore division by connecting each of the tables based on the determinedconnection sequence.